DROP TABLE IF EXISTS jms_ods.tab_report_errorbagging_detail ;
create external table jms_ods.tab_report_errorbagging_detail
(
  scan_time        timestamp        comment '扫描时间' ,
  site_code        string           comment '网点编号' ,
  site_name        string           comment '网点名称' ,
  proxy_area_code  string           comment '代理区编号' ,
  proxy_area_name  string           comment '代理区名称' ,
  franchisees_code string           comment '加盟商编号' ,
  franchisees_name string           comment '加盟商名称' ,
  bagcode          string           comment '包号' ,
  billcode         string           comment '单号' ,
  shouldodm        string           comment '应建包一段码' ,
  realodm          string           comment '实际建包一段码' ,
  scanuser         string           comment '扫描员名称及其code' ,
  remark1          string           comment '备注1' ,
  remark2          string           comment '备注2' ,
  create_time      timestamp        comment '创建时间'
)
  comment '建表错误表'
partitioned by (dt string comment '更新/创建日期(yyyy-mm-dd)')
stored as parquet
location '/dw/hive/jms_ods.db/external/tab_report_errorbagging_detail'
tblproperties (
        'discover.partitions' = 'false',
        'parquet.column.index.access' = 'true'
);

MSCK REPAIR TABLE jms_ods.tab_report_errorbagging_detail;
